Return Home

Return to Python Projects Page

Top Futures Components NewYork Stock Exchange¶

A futures market is an auction market in which participants buy and sell commodity and futures contracts for delivery on a specified future date.

1.E-Mini S&P 500 Mar 24¶

E-mini S&P 500 futures are traded on the Chicago Mercantile Exchange (CME) and allow traders to gain exposure to the S&P 500 index, a widely recognized barometer of the U.S. stock market.

2.Mini Dow Jones Indus¶

Mini Dow futures represent a portion of the standard Dow Jones Industrial Average (DJIA) futures. The DJIA is the world's most widely followed stock index and the leading U.S. stock market benchmark.

3.Nasdaq 100 Mar 24¶

a stock market index that includes 100 of the largest, most actively traded, non-financial companies that are listed on the Nasdaq Stock Market. A stock market index helps investors compare current and past price levels in order to calculate the overall market's performance.

4.E-mini Russell 2000 Index Futur¶

index futures contracts are standardized exchange-traded contracts that represent the value of 2,000 small cap stocks traded in the U.S. The value for a 1 point move in the standard contract is $50 or $5.00 for the 1/10 size micro contract.

5 U.S. Treasury Bond Futures,Jun-¶

BOT U.S. Treasury futures are standardized contracts for the purchase and sale of U.S. government notes or bonds for future delivery. The U.S. government bond market offers the greatest liquidity, security (in terms of credit worthiness), and diversity among the government bond markets across the globe.

6.10-Year T-Note Futures,Jun-2024¶

10-year Treasury bonds are experiencing a massive slump of 46% since peaking in March 2020, after the realization of higher for longer interest rates has set in ...

7.Five-Year US Treasury Note Futu¶

5-Year US Treasury futures and options are deeply liquid and efficient tools for hedging interest rate risk, potentially enhancing income, adjusting portfolio duration, interest rate speculation and spread trading.

8. 2-Year T-Note Futures,Jun-2024¶

The 2-Year Note has a contract size of $200,000 face-value per contract. This size is unique to 2-Year Notes as all other active

9.Micro Gold Futures,Jun-2024¶

Micro Gold futures are 1/10 the size of the Gold futures contract. Gold is among the most widely traded futures products worldwide. Although Gold futures are contracts for physically-deliverable commodities, these products are also critical tools for diversifying portfolios and mitigating risk.

10.Micro Silver Futures,May-2024¶

Trading of the Micro Gold futures and Micro Silver futures can be conducted through your broker or through CME Globex Sunday through Friday, almost 24 hours per day.

Data source : https://finance.yahoo.com/commodities/

In [1]:
import yfinance as yf
import pandas as pd
import matplotlib.pyplot as plt
C:\Users\jki\anaconda3\Lib\site-packages\yfinance\base.py:48: FutureWarning: The default dtype for empty Series will be 'object' instead of 'float64' in a future version. Specify a dtype explicitly to silence this warning.
  _empty_series = pd.Series()
In [21]:
import yfinance as yf

# Define the stock symbols for Top Futures
EMini_SP_symbol = "ES=F"
Mini_Dow_Jones_symbol = "YM=F"
Nasdaq_symbol = "NQ=F"
Emini_Russell_symbol = "RTY=F"
US_Treasury_Bond_symbol = "ZB=F"
Ten_Year_T_Note_symbol = "ZN=F"
Five_Year_US_Treasury_Note_symbol = "ZF=F"
Two_Year_T_Note_symbol = "ZT=F"
Micro_Gold_Futures_symbol = "MGC=F"
Micro_Silver_Futures_symbol = "SIL=F"

# Define start and end dates
start_date = '2019-01-01'
end_date = '2024-02-29'

# Fetch stock price data using yfinance
EMini_SP_data = yf.download(EMini_SP_symbol , start=start_date, end=end_date)
Mini_Dow_Jones_data = yf.download(Mini_Dow_Jones_symbol, start=start_date, end=end_date)
Nasdaq_data = yf.download(Nasdaq_symbol, start=start_date, end=end_date)
Emini_Russell_data = yf.download(Emini_Russell_symbol, start=start_date, end=end_date)
US_Treasury_Bond_data = yf.download(US_Treasury_Bond_symbol, start=start_date, end=end_date)
Ten_Year_T_Note_data = yf.download(Ten_Year_T_Note_symbol, start=start_date, end=end_date)
Five_Year_US_Treasury_Note_data = yf.download(Five_Year_US_Treasury_Note_symbol, start=start_date, end=end_date)
Two_Year_T_Note_data = yf.download(Two_Year_T_Note_symbol, start=start_date, end=end_date)
Micro_Gold_Futures__data = yf.download(Micro_Gold_Futures_symbol, start=start_date, end=end_date)
Micro_Silver_Futures_data = yf.download(Micro_Silver_Futures_symbol, start=start_date, end=end_date)
[*********************100%%**********************]  1 of 1 completed
[*********************100%%**********************]  1 of 1 completed
[*********************100%%**********************]  1 of 1 completed
[*********************100%%**********************]  1 of 1 completed
[*********************100%%**********************]  1 of 1 completed
[*********************100%%**********************]  1 of 1 completed
[*********************100%%**********************]  1 of 1 completed
[*********************100%%**********************]  1 of 1 completed
[*********************100%%**********************]  1 of 1 completed
[*********************100%%**********************]  1 of 1 completed
In [14]:
# Extract the 'Close' prices


EMini_SP_close_prices = EMini_SP_data['Close'] 
Mini_Dow_Jones_close_prices  = Mini_Dow_Jones_data['Close']
Nasdaq_close_prices  = Nasdaq_data['Close']
Emini_Russell_close_prices = Emini_Russell_data['Close'] 
US_Treasury_Bond_close_prices = US_Treasury_Bond_data['Close']
Ten_Year_T_Note_close_prices = Ten_Year_T_Note_data['Close']
Five_Year_US_Treasury_Note_close_prices  = Five_Year_US_Treasury_Note_data['Close'] 
Two_Year_T_Note_close_prices = Two_Year_T_Note_data['Close']
Micro_Gold_Futures__close_prices = Micro_Gold_Futures__data['Close'] 
Micro_Silver_Futures_close_prices = Micro_Silver_Futures_data['Close'] 
In [22]:
# Create a DataFrame to store the Futures prices
Futures_prices_df = pd.DataFrame({
    'E-Mini S&P 500 Mar 24': EMini_SP_close_prices,
    'Mini Dow Jones Indus.-$5 Mar 24': Mini_Dow_Jones_close_prices,
    'Nasdaq 100 Mar 24': Nasdaq_close_prices,
    'E-mini Russell 2000 Index Futur': Emini_Russell_close_prices,
    'U.S. Treasury Bond Futures,Jun-': US_Treasury_Bond_close_prices,
    '10-Year T-Note Futures,Jun-2024': Ten_Year_T_Note_close_prices,
    'Five-Year US Treasury Note Futu': Five_Year_US_Treasury_Note_close_prices,
    '2-Year T-Note Futures,Jun-2024n': Two_Year_T_Note_close_prices,
    'Micro Gold Futures,Jun-2024': Micro_Gold_Futures__close_prices,
    'Micro Silver Futures,May-2024': Micro_Silver_Futures_close_prices,
})
In [20]:
# Plot the 'Futures Markets Prices'
Futures_prices_df.plot(title='Futures Markets Prices')
plt.ylabel('Futures Markets ETF Prices (USD)')
plt.xlabel('Date')
plt.show()
In [ ]: